package com.zerone.dy.demomsg.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Document(collection = "JbGroupUsers")
@CompoundIndexes({
        @CompoundIndex(name = "acNogroup_index", def = "{'groupCode': 1, 'acNo': 1}",unique=true)
})
public class JbGroupUsers {

    @Id
    private String gid;
    private String groupCode;
    private String groupRemarkName;//个人备注名称
    private String tags;//标签
    private String acNo;
    private String userNickname;//昵称
    private String userHeadImg;//头像
    //0群主1管理员2普通成员
    private int roleCode;

    //状态 -2删除-1申请0正常1禁言
    private int stats;
    //创建人账号
    private String createAcNo;
    private String applyAcNo;//审批人账号
    private Date applyTime;//审批时间
    private Date createTime;

}
